package chapter07._04_Asserts;

/**
 * @Description:
 * @LastDate: 2020/11/4
 */
public class AssertManagment {
    private static Class cls;

    static {
        try {
            cls = Class.forName("chapter07._04_Asserts.AssertManagment");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    private static ClassLoader assertEnable = cls.getClassLoader();

    static {
        assertEnable.setClassAssertionStatus("chapter07._04_Asserts.AssertLearning", true);
    }

    public static void main(String[] args) throws ClassNotFoundException {
        //System.out.println(assertEnable.getClass());
        AssertLearning.whatIsAssert();
//        assertEnable.setClassAssertionStatus("chapter07._04_Asserts.AssertLearning", false);
    }
}
